
<template>
  <n-config-provider :locale="zhCN" :date-locale="dateZhCN">
    <n-dialog-provider>
      <n-message-provider>
        <div
          class="main-app"
          :class="windHeight > 1080 ? 'act' : ''"
          v-if="store.state.lyName != 'wx'"
        >
          <MessageContent></MessageContent>
          <DialogContent></DialogContent>
          <router-view v-if="store.state.IfTheFullScreen"> </router-view>
          <n-space vertical size="large" class="n-space-main" v-else>
            <n-layout has-sider style="height: 100%">
              <Dxsider v-if="store.state.OpenTheMenu"></Dxsider>
              <n-layout style="background: #eeeeee">
                <div class="display-flex czbj h100">
                  <Dxheader v-if="store.state.isheader"></Dxheader>
                  <div class="flex-1 fddsgfdst">
                    <n-layout-content content-style="padding: 10px;">
                      <router-view v-slot="{ Component }">
                        <keep-alive :include="keepAlive">
                          <component :is="Component" />
                        </keep-alive>
                      </router-view>
                    </n-layout-content>
                  </div>
                </div>
              </n-layout>
            </n-layout>
          </n-space>
        </div>
        <div v-else>
          <router-view v-slot="{ Component }">
            <keep-alive :include="keepAlive">
              <component :is="Component" />
            </keep-alive>
          </router-view>
        </div>
      </n-message-provider>
    </n-dialog-provider>
  </n-config-provider>
</template>
          
           <script lang='ts' setup>
import {
  NMessageProvider,
  NDialogProvider,
  NConfigProvider,
  zhCN,
  dateZhCN,
} from "naive-ui";
// import "./rem.js";
import MessageContent from "./components/MessageContent.vue";
import DialogContent from "./components/DialogContent.vue";
import { ref } from "vue";
import store from "./store";
import Dxsider from "./layout/Dxsider.vue";
import Dxheader from "./layout/Dxheader.vue";

const windHeight = ref(store.state.windHeight);
const keepAlive = store.state.keepAlive;
</script>
          
          <style scoped>
.main-app {
  height: 100vh;
}
.n-space-main {
  height: 100%;
}

.n-layout-sider {
  background: #181818;
}
.n-layout {
  background: transparent;
}
.fddsgfdst {
  overflow: auto;
}
</style>